The notion of a prime number is a special case of the ideas of a prime element and irreducible element in the ring of integers .
Definition
An integer is called a prime number if its only positive divisors are and itself.
This definition looks much like that of irreducibility in rings.
Intuitively we may invoke the fact that every irreducible element is prime in a unique factorisation domain to prove that such elements are prime elements. However typically the defining property of prime elements is used to prove that is a unique factorisation domain. Therefore, we must prove this property of prime numbers prior to proving the equivalence of prime element and irreducible elements. The relevant result proving this is Euclid's lemma.
Once this is known, we can prove the following.
Theorem
An integer is prime number if and only if it is an irreducible element, or equivalently it is a prime element.
Proof
Suppose is a prime number and for some . Since we know and hence . As such, we assume without loss of generality that and are greater than zero, since if they are both negative, we can work with their corresponding absolute values. Since , and . As such, because is prime. It is impossible for otherwise because . Therefore either or and we have that is irreducible because are units.
For the reverse implication, assume is irreducible. Then if , either or is a unit. If is a unit then and therefore ; likewise for . Since we may choose to be any divisor of and adjust accordingly, we can conclude that the only divisors of of are and hence the only positive divisors are and , thus is a prime number.
Since is a unique factorisation domain by the fundamental theorem of arithmetic we know that the set of irreducible elements is equivalent to the set of prime elements.